package net.cdsunrise.com.worker.controller;

import net.cdsunrise.com.worker.client.HelloWorldClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: LiuWei
 * @date: Create in 16:31 2018/05/14
 */
@RestController
public class WorkerController {


    @Autowired
    HelloWorldClient helloWorldClient;

    @GetMapping("test")
    @PreAuthorize("hasAuthority('re1')")
    public String test() {
        return helloWorldClient.get();
    }
}
